#include<stdio.h>
#include<math.h>

int main() {
	int a = 0;
	int b = 0;
	int c = 0;
	for (int i = 100; i < 1000; i++) {
		a = i / 100;
		b = (i / 10) % 10;
		c = i % 10;
		
		if (i == pow(a, 3) + pow(b, 3) + pow(c, 3))
			printf("%d ", i);
	}
	return 0;
}

